From acaf5436576f8ad8fa736c93e6ee618b4b371d55 Mon Sep 17 00:00:00 2001 From: Jeremy Bryant Date: Thu, 29 Feb 2024 22:33:48 +0000 Subject: [PATCH] Use declare form instead of put, for clarity * which-key.el (which-key-add-major-mode-key-based-replacements): Use declare form instead of put. --- which-key.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index 3eb27be8f10..c522f59a26b 100644 --- a/which-key.el +++ b/which-key.el @@ -1129,6 +1129,7 @@ replacements are added to `which-key-replacement-alist'." The difference is that MODE specifies the `major-mode' that must be active for KEY-SEQUENCE and REPLACEMENT (MORE contains addition KEY-SEQUENCE REPLACEMENT pairs) to apply." + (declare (indent defun)) ;; TODO: Make interactive (when (not (symbolp mode)) (error "MODE should be a symbol corresponding to a value of major-mode")) @@ -1155,8 +1156,6 @@ addition KEY-SEQUENCE REPLACEMENT pairs) to apply." (if (assq mode which-key--prefix-title-alist) (setcdr (assq mode which-key--prefix-title-alist) title-mode-alist) (push (cons mode title-mode-alist) which-key--prefix-title-alist)))) -(put 'which-key-add-major-mode-key-based-replacements - 'lisp-indent-function 'defun) (defun which-key-define-key-recursively (map key def &optional at-root) "Recursively bind KEY in MAP to DEF on every level of MAP except the first. -- 2.30.2